<?php 
session_start();
$_SESSION['rent'];
$array = unserialize($_SESSION['rent']);
include_once('function.php');
$db=new db(); 
$sql = $array;
$file ="rent";
$map=array("租屋編號",'回報用戶帳號','聯繫電話','地址','日期','類型','內容','提交時間');//表头 
$db->toExcel($sql,$map,$file); 
?>